<?php
/**
 * Date: 2024.8
 * Author: kahn
 * 基础配置
 */
namespace config;

class Config
{
    //单号码日短信最大发送条数
    const MAX_MSG_NUM = 10;

    //1-pc, 2-h5, 3-ios, 4-android, 5-harmony, 6-wxmicro
    //平台常量开始=================================================
    const PLATFORM_PC = 1;
    const PLATFORM_H5 = 2;
    const PLATFORM_IOS = 3;
    const PLATFORM_ANDROID = 4;
    const PLATFORM_HARMONY = 5;
    const PLATFORM_WXMICRO = 6;

    //平台枚举
    const PLATFORM_MAP = array(
        self::PLATFORM_PC => 'PC',
        self::PLATFORM_H5 => 'H5',
        self::PLATFORM_IOS => 'IOS',
        self::PLATFORM_ANDROID => 'ANDROID',
        self::PLATFORM_HARMONY => 'HARMONY',
        self::PLATFORM_WXMICRO => 'WXMICRO',
    );

    const REGISTER_LOGIN_TYPE_SMS = 1;
    const REGISTER_LOGIN_TYPE_WX = 2;
    const REGISTER_LOGIN_TYPE_MOBILE_AUTH = 3;
    const REGISTER_LOGIN_TYPE_TOKEN_VERIFY = 4;

    const WX_PLATFORM_WEB = 1;
    const WX_PLATFORM_WAP = 2;
    const WX_PLATFORM_PUBLIC = 3;
    const WX_PLATFORM_MICRO = 4;
    const WX_PLATFORM_ANDROID_APP = 5;
    const WX_PLATFORM_IOS_APP = 6;

    //配置信息
    const WX_PLATFORM = [
        //PC网站
        self::WX_PLATFORM_WEB => [
            "appId" => "",
            "secret" => "",
        ],

        //APP-目前app授权都在客户端走, 不走服务器
        self::WX_PLATFORM_WAP =>[
            "appId" => "",
            "secret" => "",
        ],

        //公众号
        self::WX_PLATFORM_PUBLIC =>[
            "appId" => "",
            "secret" => "",
            'redirectUrl' => '/vip/notify/openId'
        ],

        //小程序
        self::WX_PLATFORM_MICRO => [
            "appId" => "",
            "secret" => "",
        ],
        //小程序
        self::WX_PLATFORM_ANDROID_APP => [
            "appId" => "",
            "secret" => "",
        ],
        //小程序
        self::WX_PLATFORM_IOS_APP => [
            "appId" => "",
            "secret" => "",
        ],

    ];

    CONST DONUT = [
        'appId'=> '',
        'secret'=> '',
    ];

    CONST APP_DOWNLOAD_URL = [
        self::PLATFORM_IOS => 'this is ios download url',
        self::PLATFORM_ANDROID => 'this is android download url',
        self::PLATFORM_HARMONY => 'this is harmony download url',
    ];
}
